<extend name="./Application/Admin/View/Layout/application.html"/>

<block name="content">
    <div class="row">
        <div class="col-md-8">

            <div class="panel panel-info">
                <div class="panel-heading">
                    <h3 class="panel-title"><img src="__PUBLIC__/assets/admin/images/wav.gif" width="16" height="16">
                        我的相册集</h3>
                </div>
                <div class="panel-body">
                    上传照片，记录生活中的点点滴滴！
                </div>
            </div>
            <div class="row">
                <volist name="photos" id="photo">
                    <div class="col-sm-6 col-md-4">
                        <div class="thumbnail">
                            <img data-src="holder.js" src="{{$photo.thumb}}"
                                 data-holder-rendered="true"
                                 style="height: 200px; width: 100%; display: block;">
                            <div class="caption">
                                <p><h4>{{$photo.title}}</h4>【{{$photo.time|date=('Y-m-d'),###}}】</p>
                                <p>{{$photo.discription}}</p>
                                <p><a href="#" class="btn btn-info btn-xs glyphicon glyphicon-trash"></a>
                                    【旅游相册】
                                </p>
                            </div>
                        </div>
                    </div>
                </volist>
            </div>


            <nav style="margin-left: 510px;">
                <ul class="pagination">
                    <li class="disabled"><a href="#" aria-label="Previous"><span aria-hidden="true">«</span></a></li>
                    <li class="active"><a href="#">1 <span class="sr-only">(current)</span></a></li>
                    <li><a href="#">2</a></li>
                    <li><a href="#">3</a></li>
                    <li><a href="#">4</a></li>
                    <li><a href="#">5</a></li>
                    <li><a href="#" aria-label="Next"><span aria-hidden="true">»</span></a></li>
                </ul>
            </nav>
        </div>

        <div class="col-md-4">
            <form action="__SELF__" METHOD="post">
                <div class="panel panel-success">
                    <div class="panel-heading">
                        <a href="{{:U('add')}}" class="panel-title">上传美照</a>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <div class="panel panel-default" style="bottom:0;">
        <div class="panel-body" style="text-align: center;">
            武汉长乐教育版权所有
        </div>
        <div class="panel-footer" style="text-align: center;">Copyright 2017-03</div>
    </div>
</block>

<block name="js">
    <script src="__PUBLIC__/vendor/ckeditor/ckeditor.js"></script>
    <script src="__PUBLIC__/vendor/ckfinder/ckfinder.js"></script>
    <script>
        $(function () {
            //上传缩略图（单张图片）
            $("#ck_thumb_upload").click(function () {
                CKFinder.modal({
                    chooseFiles: true,
                    language: 'zh-cn',
                    onInit: function (finder) {
                        finder.on('files:choose', function (evt) {
                            var url = evt.data.files.first().getUrl();
                            $("#thumb").val(url);
                            $("#img_show").attr('src', url);
                        });
                    }
                });
            });

        })
    </script>
</block>